First, Select case syntax and parameter introduction
Select Case testexpression
[Case Expressionlist-n
[Statements-n]] ...
[Case Else
[Elsestatements]]
End Select
The syntax for the Select case statement has the following sections:
Select Case StatementExecutes one of several sets of statements based on the value of an expression.
Select Case testexpression[Case Expressionlist-n[Statements-n]] . . .[Case Else Expressionlist-n[Elsestatements-n]]End Select
There are many locks that can be learned, such as the lock granularity, lock mode, lock compatibility, and isolation level.
However, how does one obtain the corresponding lock when running a statement? For example, if a select statement requires an
Case has two formats. Simple case function and case search function.--Simple Case function Case Sex When ' 1 ' Then ' men ' When ' 2 ' then ' women ' Else ' other ' END --case search function case If sex = ' 1 ' Then ' man ' When sex = ' 2 '
Select Case statement
Execute several sets of statements based on the expression value.
Select Case testexpression[Case expressionlist-n[statements-n]] . . .[Case Else expressionlist-n[elsestatements-n]]End SelectParameters
Testexpression
Any number
You cannot use the switch statement in ASP, you need to use the Select Case statement
A Brief introduction
Select the work of the report, if the statement. The difference, however, is that they can check for multiple values. Of course, you
This section describes how to use C # To select control statements. The third lesson will achieve the following purposes:1. Learn how to use the "if" statement.
2. Learn how to use the "switch" statement.
3. Learn how to use the "break" statement in
I. Shell Condition Statement (if usage)
If statement structure [if/then/Elif/else/FI]
If condition test statement
Then
Action
[Elif Condition
Action
Else
Action
]
Fi
If you are not clear about the conditional test statement, refer to:
If testexpression matches any of the case expressionlist expressions
, execute the statement between this case clause and the next one, for the last
clause, the statement is executed between the clause and the end Select, and the control
The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.